In This Topic
    In This Topic

    The following example demonstrates how to change the foreground and background of the current cell.

    XAML
    Copy Code
    <Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid">
      <Grid.Resources>
        <Style TargetType="{x:Type xcdg:DataCell}">
          <Setter Property="CurrentForeground">
            <Setter.Value>
              <SolidColorBrush Color="Yellow"/>
            </Setter.Value>
            </Setter>
              <Setter Property="CurrentBackground">
                <Setter.Value>
              <SolidColorBrush Color="Orange"/>
            </Setter.Value>
          </Setter>
        </Style>
        <xcdg:DataGridCollectionViewSource x:Key="cvs_orders"
                                        Source="{Binding Source={x:Static Application.Current},
                                                          Path=Orders}"/>
       </Grid.Resources>
       <xcdg:DataGridControl x:Name="OrdersGrid"
                             ItemsSource="{Binding Source={StaticResource cvs_orders}}"/>
    </Grid>